﻿@using si.caha.Model;
@using si.caha.Repository;

@{
    if(IsPost)
    {
        var orderId = Request["completed"].AsInt();
        var dataContext = new DataContext();
        var orderRepository = new OrderRepository(dataContext);
        
        orderRepository.ToggleCompleted(orderId);
    }
    else
    {
        Response.Redirect("~/Admin");
    }
}
